execute as @a[nbt={Inventory:[{id:"minecraft:note_block"}]},tag=!rs_allow] run tag @s add redstone
execute as @a[nbt={Inventory:[{id:"minecraft:sticky_piston"}]},tag=!rs_allow] run tag @s add redstone
execute as @a[nbt={Inventory:[{id:"minecraft:piston"}]},tag=!rs_allow] run tag @s add redstone
execute as @a[nbt={Inventory:[{id:"minecraft:lever"}]},tag=!rs_allow] run tag @s add redstone
execute as @a[nbt={Inventory:[{id:"minecraft:redstone"}]},tag=!rs_allow] run tag @s add redstone
execute as @a[nbt={Inventory:[{id:"minecraft:redstone_torch"}]},tag=!rs_allow] run tag @s add redstone
execute as @a[nbt={Inventory:[{id:"minecraft:redstone_lamp"}]},tag=!rs_allow] run tag @s add redstone
execute as @a[nbt={Inventory:[{id:"minecraft:redstone_block"}]},tag=!rs_allow] run tag @s add redstone
execute as @a[nbt={Inventory:[{id:"minecraft:hopper"}]},tag=!rs_allow] run tag @s add redstone
execute as @a[nbt={Inventory:[{id:"minecraft:iron_trapdoor"}]},tag=!rs_allow] run tag @s add redstone
execute as @a[nbt={Inventory:[{id:"minecraft:trapped_chest"}]},tag=!rs_allow] run tag @s add redstone
execute as @a[nbt={Inventory:[{id:"minecraft:dropper"}]},tag=!rs_allow] run tag @s add redstone
execute as @a[nbt={Inventory:[{id:"minecraft:observer"}]},tag=!rs_allow] run tag @s add redstone
execute as @a[nbt={Inventory:[{id:"minecraft:iron_door"}]},tag=!rs_allow] run tag @s add redstone
execute as @a[nbt={Inventory:[{id:"minecraft:repeater"}]},tag=!rs_allow] run tag @s add redstone
execute as @a[nbt={Inventory:[{id:"minecraft:comparator"}]},tag=!rs_allow] run tag @s add redstone
execute as @a[nbt={Inventory:[{id:"minecraft:target"}]},tag=!rs_allow] run tag @s add redstone
execute as @a[nbt={Inventory:[{id:"minecraft:tripwire_hook"}]},tag=!rs_allow] run tag @s add redstone
execute as @a[tag=redstone] as @s run function redstone:tri
